package cn.wp.pet.controller;

import cn.wp.pet.domain.PetType;
import cn.wp.pet.service.IPetTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/petType")
public class PetTypeController {

    @Autowired
    private IPetTypeService petTypeService;

    /**
     * 获取所有的宠物类型
     * @return
     */
    @GetMapping
    public List<PetType> findAll(){
        return petTypeService.findAll();
    }
}
